<?php

namespace App\Models\User\Repositories\Interfaces;

use App\Models\User\User;
use App\Models\User\WechatMiniAppUser;
use App\Models\User\WechatOfficialUser;

interface UserRepositoryInterface
{
    public function addUser(array $data): User;

    public function addMiniUser(User $user, array $data): WechatMiniAppUser;

    public function addOfficialUser(User $user, array $data): WechatOfficialUser;

    public function getUserByUserId(string $user_id): ?User;

    public function getUserByUnionIdOpenIdType(string $union_id, string $open_id, int $client_type): ?User;

    public function getMiniAppUserByOpenId(User $user, string $openid): ?WechatMiniAppUser;

    public function getMiniAppUserByAppId(User $user, string $appid): ?WechatMiniAppUser;

    public function getOfficialUserByOpenId(User $user, string $openid): ?WechatOfficialUser;

    public function getOfficialUserByAppId(User $user, string $appid): ?WechatOfficialUser;

    public function updateUser(User $user, array $param): bool;

    public function updateUserAvatar(User $user): bool;
}